import React, { lazy } from 'react'
import { createBrowserRouter } from 'react-router-dom'
const List = lazy(() => import('../Page/List'))
const Detail = lazy(() => import('../Page/Detail'))
const Pay = lazy(() => import('../Page/Pay'))
const Order = lazy(() => import('../Page/Order'))
const PoresnList = lazy(() => import('../Page/PoresnList'))
const OrderDetail = lazy(() => import('../Page/OrderDetail'))
export const router = createBrowserRouter([
    {
        path: '/',
        element: <List />,
    },
    {
        path: '/detail/:id',
        element: <Detail />,
    },
    {
        path: '/pay',
        element: <Pay />,
    },
    {
        path: '/order',
        element: <Order />,
    },
    {
        path: '/poresnList',
        element: <PoresnList />,
    },
    {
        path:'/OrderDetail',
        element: <OrderDetail />
    }
])